//事件
exec = require("child_process").exec;

function start(res){
	var content = "hello start";
	exec("find /",{timeout:10000, maxBuffer:20000*1024}, function(error, stdout, stderr){
		console.log("handle start stdout %s",stdout);
		res.writeHead(200, {"Content-Type": "text/plain;chartset=utf-8"});
		res.write(stdout);
		res.end();
	});
	console.log("事件Start %s", content);
	return content;
	return "事件start";
}

function upload(res){
	console.log("事件upload");
	res.writeHead(200, {"Content-Type": "text/plain;chartset=utf-8"});
	res.write('hello upload');
	res.end();
}

//es6 规范
exports.start = start;
exports.upload = upload;